import ajax from "@/router/request";

export const courseCategory = temp =>
  ajax("/api/courseCategory/listCourseCategory", temp, "GET");
export const listCourse = temp => ajax("/api/course/listCourse", temp, "GET");
export const buyCourse = temp => ajax("/api/order/saveOrder", temp, "POST");
export const getOrderQCode = temp => ajax("/api/order/url/" + temp, {}, "GET");
export const getOrderState = temp =>
  ajax("/api/order/state/" + temp, {}, "GET");
export const getCourseQuestion = temp =>
  ajax("/api/question/list", temp, "GET");
export const addCourseQuestion = temp =>
  ajax("/api/question/question", temp, "POST");
export const courseStudyTimer = temp =>
  ajax("/api/course/saveOrUpdatecourseStudy", temp, "POST");
export const getCoursePrice = temp =>
  ajax("/api/course/getCoursePrice", temp, "GET");
export const getPlayHint = temp =>
  ajax("/api/studentLoginHint/getPlayHint", temp, "GET");
export const getBuyHint = temp =>
  ajax("/api/studentLoginHint/getBuyHint", temp, "GET");
export const postinvoices = temp =>
    ajax("/api/order/invoiceOrder", temp, "POST");
export const downloadinvoices = temp =>
    ajax("/api/order/downloadInvoice", temp, "GET");
